package com.qf.common.core.enums;

public enum RedisKeyEnum {

    /**
     * 验证码 code: 手机号
     */
    KEY_CODE("code:%s", 300),

    /**
     * 验证码的发送次数 code:num:手机号
     */
    KEY_CODE_NUM("code:num:%s", 600);


    private String key;

    private long timeout;

    RedisKeyEnum(String key, long timeout) {
        this.key = key;
        this.timeout = timeout;
    }

    RedisKeyEnum(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }

    public long getTimeout() {
        return timeout;
    }
}
